<template>
	<view class="main" style="margin-top: 4vw;">
		<view class="about">
			<view class="about_li" v-for="(item,index) in list" :key="index">
				<view class="about_tit t22">{{item.name}}</view>
				<view class="about_info t22">{{item.value}}</view>
			</view>
			<!-- <view class="about_li">
		<view class="about_tit t22">QQ客服</view>
		<view class="about_info t22">1111</view>
		</view>
		<view class="about_li">
		<view class="about_tit t22">电话客服</view>
		<view class="about_info t22">0635-2600000</view>
		</view> -->
		</view>
		<!-- <web-view :src="src"></web-view>-->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cont: '111',
				look: '',
				time: '',
				title: '微信客服号',
				headimg: '',
				tel: '',
				nickname: '',
				src: '',
				mainid: '',
				list: []
			}
		},
		onLoad() {
			var _this = this;

			uni.getStorage({
				key: 'user',
				success: function(res) {
					_this.mainid = res.data.id;
					_this.kefu();
				}
			});
			// 获取系统信息同步接口。
			// console.log((plus.runtime.version).split('.').join(''));
		},
		methods: {
			kefu() {
				uni.request({
					header: {
						'Content-Type': 'application/x-www-form-urlencoded', //自定义请求头信息
					},
					url: getApp().globalData.url + 'sys/serviceList', //仅为示例，并非真实接口地址。
					method: 'POST',
					// data: {
					// 	id: this.mainid
					// },
					success: (res) => {
						uni.hideLoading(); //关闭加载动画
						console.log(res);
						// console.log(2222);
						if (res.data.status == '200') {
							// console.log(11111);
							this.list = res.data.data;
						} else {

							uni.showToast({
								title: res.data.msg,
								icon: 'none',
								duration: 2000
							});
						}
					},
					fail: (error) => {
						uni.hideLoading();
						// this.checks = true
						uni.showToast({
							title: error,
							icon: 'none',
							duration: 2000
						});
						console.log(error)
					}
				});
			},

		}
	}
</script>

<style>
	.about {
		border-radius: 2vw;
		background: #fff;
		padding: 4vw;
		width: 100%;
		display: block;
		float: left;
		height: auto;
	}

	.about_li {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		line-height: 10vw;
		border-bottom: 1px solid #ddd;
		padding: 3vw 0;
	}

	.about_li:last-child {
		border: none;
	}

	.about_tit {
		width: 30%;
		height: auto;
		display: block;
		float: left;
		text-align: center;
		line-height: 10vw;
	}

	.about_info {
		width: 70%;
		height: auto;
		display: block;
		float: left;
		line-height: 10vw;
		text-align: right;
	}
</style>
